def fibonaci(n:int):
    index_old = 0
    index = 1
    for x in range(1, n):
        index_old, index = index ,index+index_old
        print(index)
    return index
assert fibonaci(7) == 13
assert fibonaci(11) == 89


print("===============================================")

def tree_bonaci(n: int) -> int:
    index_old_old = 0
    index_old = 1
    index = 1
    for x in range(0, n):
        index_old_old, index_old, index = index_old, index ,index + index_old + index_old_old
        print(index)
    return index

tree_bonaci(9)